import React from 'react'
import ReactDOM from 'react-dom'

// props默认值
const App = props => {
    console.log(props)
    return (
        <div>
            <h1>展示props的默认值:{props.pageSize}</h1>
        </div>
    )
}

// 添加默认值
App.defaultProps = {
    pageSize:10
}

ReactDOM.render(<App pageSize={20}/>, document.getElementById('root'))